home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
VISUALBA
/
MLIST4.ZIP
/
READ.ME
< prev
next >
Wrap
Text File
|
1994-02-24
|
22KB
|
578 lines
***************************************************************************
*
* McKean Consulting
* Robin W. McKean
* 1042 Braddock Circle
* Woodstock GA 30188
*
* MLIST.VBX V4.11.0000
*
* Multi-Purpose List Box Control for Visual Basic 3.0
*
***************************************************************************
MLIST is a custom control for managing the way your data appears in a list
box. MLIST is a property for property replacement of the standard List Box
control which comes with Visual Basic 3.0. In addition, there are many more
features which MLIST can do that you can't do with the normal List Box. Some
of these features are:
* Set up owner draw columnar data in the list box. This is NOT a
MULTI-COLUMN list box. MLIST now has this feature, but the MLIST
List Box scrolls vertically, like a normal list box. Your data is
arranged in columns, with specific drawing flags setup for each
"Drawing Region". Think of each line as being broken up into
different areas, each with its own drawing flags and data.
* Make a drawing region a bitmap or a checkbox. You have control
over the entire list's bitmaps through the default bitmap property,
or you can set individual lines bitmap properties.
* Control individual line colors in the list box
* Total control over the checked and unchecked states of lines
* Now MLIST has aligned bitmaps as well. You specifiy the bitmap,
the text, and the alignment (top, bottom, right, left), and MLIST
will draw the text and the bitmap in the area you define.
* New in verions 4.00. You can now have true MUTLIPLE COLUMN list
boxes, with bitmaps and check boxes. Multiple columns are set
up through setting the LBS_MULTICOLUMN style for the list box.
You control the width of each item. This attribute differs in
that each line has a certain width. So it may take two or more
columns of items to actually fill a line
* Checking and Selecting a range of line items
* Properties to find closest match and find exact matches in the
list box.
* Complete control over colors in the list box. Colors can be
set for normal lines, individual lines, normal highlight colors,
and individual highlight colors.
* MList V4.10 now has 3-D effects
* You can now setup vertical and horizontal grids
***************************************************************************
This ZIP file contains:
MLIST.VBX VB version of the MLIST custom control
PROJECT1.MAK Sample project file for MLIST
FORM1.FRM Form used by the sample project
READ.ME This file
PLUS.BMP Bitmap used in example
PAGE.BMP Ditto
FINDSTR.MAK FindString and FindStringExact Demo
FIND1.FRM Form for FindString Demo
***************************************************************************
REGISTRATION
Time for the sob story. This Multi-Column List Box is Shareware. It is
NOT crippled in anyway. When you download this custom control, you have
the same custom control that I am using in my everyday VB programming.
As a Shareware contributor, I am counting on the honor and moral fiber of
every person who downloads this custom control to do the right thing. I
have contributed and participated in the Shareware arena for years now.
Your small contribution can make a difference to me and my family...
Right now, the maximum string size in the List Box is 255 characters. Let me
know if this causes a problem. I don't anticipate anyone needing to display
more than this number of characters to the screen.
If you like and appreciate this custom control...
1) Small time developers like me, send $10.00 to the address listed above
2) Corporate users send $15.00 to the address listed above
3) Register in the Compuserve SWREG forum ID 1585
Registered users may purchase the source...
Send $35.00 to me at the above address.
This control is written in C++ and has been compiled using both
Borland C++ 3.1 and Visual C++ 1.0.
You may now register this control in the SWREG on Compuserve. Type GO SWREG.
If you want the source, you will still have to write me...
Corporate users should register via mail.
***************************************************************************
WARRANTY
The control, as is, works the way that I want it to. This does not mean
that it will work the way that you want it to. Along those lines, I
totally disclaim that the control will do anything whatsoever. This
includes any implied abilities and any WARRANTIES, including those for
SUITABILITY for a particular purpose, MERCHANTIBILITY, and all that other
bull crap.
***************************************************************************
PROGRAMMER'S NOTES (or, what I need to know to use this custom control)
The Multi-Column List Box is an enhanced List Box control. The following
is a desciption of each additional control. What it does, and how to
use it in your own VB programming. For additional control properties, see
those for properties included in the standard list box control. MLIST now
contains all standard controls. The ones listed below are additions.
ItemHeight
This property is responsible for controlling the height of each individual
line item in the list box. It defaults to 195 Twips, the height of the
font used by the standard list box. You should adjust this height if you
change the font, font size, etc..
I'm not sure whether or not this property will change the height of the lines
after the list box has already been created. I did not design the list box
control to have the height of the items change dynamically. Set the height
of this item at design time, and the font, and your list box will be fine.
Experiment with this during run-time if you like, and let me know how it
works out, and how I can make this item work more to your liking.
DrawRegions
This item determines the number of drawing regions on each line. This is
basically equivelent to the number of COLUMNS, but this list box will still
scroll like a normal list box. When setting this property, the control
clears the flags for the draw regions and sets them to left aligned, single
line, and centered vertically. Consult the Windows API for DrawText to
see what exactly these flags mean.
ItemLength
This is an indexed property which corresponds to the length of each drawing
region. If you want a drawing region to be a specific length, set that
drawing region's length to the desired setting in twips. For example...
MList1.DrawRegions = 2
MList.ItemLength(1) = 500
MList.ItemLength(2) = 500
' Generates an out of index error
MList1.ItemLength(0) = XXX
MList1.ItemLength(3) = XXX
It is probably a good idea to set the lengths of all drawing regions when you
are changing the defaults.
DrawFlags
This is an indexed property which corresponds to the flags of each drawing
region. If you want a drawing region to be drawn in a specific manner, set
that drawing region's flags to the desired settings. For specific flags,
look up the DrawText API function in the Windows API Reference. In the
following example, I setup two drawing regions and set the second drawing
region's flags to right justify the text. In this example, the second
drawing region displays currency values.
Const DT_RIGHT = 2
Const DT_VCENTER = 4
Const DT_SINGLELINE = 32
MList1.DrawRegions = 2
MList1.Flags(2) = DT_RIGHT + DT_VCENTER + DT_SINGLELINE
MList.ItemLength(1) = 500
MList.ItemLength(2) = 500
If you are planning to include the '&' character in your strings, you
should include the DT_NOPREFIX flag to avoid the underline. I do NOT
automatically add this flag for you, as I want you to have total control
over the flags.
ActiveRegion
Setting this property affects the next two properties. It defines the
DrawingRegion (or index or column) that TextRegion and ListRegion will
return. Perhaps an example is in order.
My list box is divided up into three columns, name, account number, dollar
amount. I want t